package com.rao.mongodb.explorer.service.impl;

import com.alibaba.fastjson.JSONObject;
import com.rao.mongodb.explorer.common.constants.SystemConstant;
import com.rao.mongodb.explorer.entity.Member;
import com.rao.mongodb.explorer.service.IMemberService;
import org.springframework.stereotype.Service;

import javax.core.common.ResultMsg;

/**
 * 操作权限接口实现类
 *
 * @author raos
 * @emil 991207823@qq.com
 * @date 2021/8/31 22:11
 */
@Service
public class MemberService implements IMemberService {

    @Override
    public ResultMsg<?> login(String loginName, String loginPass) {
        return new ResultMsg<Member>(SystemConstant.RESULT_STATUS_SUCCESS, "登录成功", new Member());
    }

    @Override
    public ResultMsg<?> logout(String loginName) {
        JSONObject data = new JSONObject();
        data.put("loginHost", "/login.html");
        return new ResultMsg<>(SystemConstant.RESULT_STATUS_SUCCESS, "退出成功", data);
    }

}
